import request from '@/utils/request'

// 定义公共的api 
const BASE_URL = '/system/checkIn';

export default {
    // 查询用户和分页
    getPageInfo(page, limit, searchObj) {
        return request({
            url: `${BASE_URL}/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },
    
    // 添加学生
    save(checkIn) {
        return request({
            url: `${BASE_URL}/save`,
            method: 'post',
            data: checkIn
        })
    },




    // 根据ids从宿舍中删除学生
    removeById(id,ids) {
        console.log('id: ',id)
        console.log('ids: ',ids)
        return request({
            url: `${BASE_URL}/removeByStudentIds/${id}/${ids}`,
            method: 'delete',
        })
    },
    findById(id) {
        return request({
            url: `${BASE_URL}/findById/${id}`,
            method: 'get'
        })
    },



}